<div class="container">
  <div class="row">
    <div class="col-md-4">
      <div class="tiles green text-center" id="datetime">
        <div class="tiles-body">
          <h1 class="lead">{{ date.raw | date:'HH:mm:ss'}}</h1>
          <p class="lead">{{ date.raw | date: 'EEEE, MMMMd日' }}</p>
        </div>
      </div>
    </div>

    <div class="col-md-4">
      <div class="tiles purple">
        <div class="tiles-body">
          <div class="tiles-title text-black">项目统计</div>
          <div class="widget-stats">
            <div class="wrapper transparent">
              <span class="item-title">项目总计</span>
              <span class="item-count">{{projects.length}}</span>
            </div>
          </div>
          <div class="widget-stats">
            <div class="wrapper transparent">
              <span class="item-title">今天的项目</span>
              <span class="item-count">NaN</span>
            </div>
          </div>
          <div class="widget-stats">
            <div class="wrapper last transparent">
              <span class="item-title">平均每月</span>
              <span class="item-count">NaN</span>
            </div>
          </div>
          <div class="progress transparent progress-small no-radius m-t-20" style="width:90%">
            <div class="progress-bar progress-bar-white animate-progress-bar" data-percentage="54%" style="width: 4%;"></div>
          </div>
          <div class="description"> <span class="text-white mini-description "><span class="blend">比上月</span> 增长 NaN%</span></div>
        </div>
      </div>
    </div>

    <div class="col-md-4">
      <div class="tiles blue">
        <div class="tiles-body">
          <div class="tiles-title text-black">工作统计</div>
          <div class="widget-stats">
            <div class="wrapper transparent">
              <span class="item-title">入职</span>
              <span class="item-count" am-time-ago="currentUser.registed_at"></span>
            </div>
          </div>
          <div class="widget-stats">
            <div class="wrapper transparent">
              <span class="item-title">负责的项目</span>
              <span class="item-count">{{leadcount}}</span>
            </div>
          </div>
          <div class="widget-stats">
            <div class="wrapper last transparent">
              <span class="item-title">工作报告</span>
              <span class="item-count">{{reports.length}}</span>
            </div>
          </div>
          <div class="progress transparent progress-small no-radius m-t-20" style="width:90%">
            <div class="progress-bar progress-bar-white animate-progress-bar" data-percentage="54%" style="width: 4%;"></div>
          </div>
          <div class="description"> <span class="text-white mini-description "><span class="blend">比上月</span> 增长 NaN%</span></div>
        </div>
      </div>
    </div>
  </div>
  <br />
  <div class="row" ng-hide="weatherLoading">
    <p class="text-center"><i class="fa fa-circle-o-notch fa-spin"></i> 加载中...</p>
  </div>
  <div class="row" ng-show="weatherLoading">
    <div class="col-md-9">
      <div class="tiles white" id="future-weather">
        <div class="tiles-body">
          <div class="tiles-title text-black">未来天气</div>
          <div class="widget-stats" ng-repeat="weather in weather.weather">
            <div class="wrapper last transparent">
              <span class="item-title">{{ ::weather.date | date: 'EEEE, MMMMd日'}}</span>
						<span class="item-count" ng-switch="weather.info.day[1]">
							<i ng-switch-when="晴" class="wi wi-lg wi-day-sunny"></i>
							<i ng-switch-when="小雨" class="wi wi-lg wi-rain"></i>
							<i ng-switch-when="中雨" class="wi wi-lg wi-rain"></i>
							<i ng-switch-when="大雨" class="wi wi-lg wi-rain"></i>
							<i ng-switch-when="暴雨" class="wi wi-lg wi-rain"></i>
							<i ng-switch-when="阵雨" class="wi wi-showers"></i>
							<i ng-switch-when="雷阵雨" class="wi wi-storm-showers"></i>
							<i ng-switch-when="多云" class="wi wi-lg wi-day-cloudy"></i>
							<i ng-switch-default class="wi wi-lg wi-cloudy"></i>
						</span>
              <span class="item-count">{{ ::weather.info.day[1] }}</span>
              <span class="item-count">{{ ::weather.info.night[2] }}℃~{{ ::weather.info.day[2] }}℃</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="col-md-3">
      <div class="tiles white" id="weather">
        <div class="tiles-body">
          <div class="tiles-title text-black">实时天气</div>
          <div class="tiles-weather icon" ng-switch="weather.realtime.weather.info">
            <i ng-switch-when="晴" class="wi wi-lg wi-day-sunny"></i>
            <i ng-switch-when="小雨" class="wi wi-lg wi-rain"></i>
            <i ng-switch-when="中雨" class="wi wi-lg wi-rain"></i>
            <i ng-switch-when="大雨" class="wi wi-lg wi-rain"></i>
            <i ng-switch-when="暴雨" class="wi wi-lg wi-rain"></i>
            <i ng-switch-when="阵雨" class="wi wi-showers"></i>
            <i ng-switch-when="雷阵雨" class="wi wi-storm-showers"></i>
            <i ng-switch-when="多云" class="wi wi-lg wi-day-cloudy"></i>
            <i ng-switch-default class="wi wi-lg wi-cloudy"></i>
          </div>

          <div class="tiles-weather info">
            天气情况：{{ ::weather.realtime.weather.info }}<br />
            体感温度：{{ ::weather.realtime.feelslike_c }}℃<br />
          </div>
        </div>
      </div>
    </div>
  </div>

  <br>
  <div class="row" ng-hide="feedsLoading">
    <p class="text-center"><i class="fa fa-circle-o-notch fa-spin"></i> 加载中...</p>
  </div>
  <div class="row" ng-show="feedsLoading">
    <div class="col-md-12">
      <div class="tiles white"id="feeds">
        <div class="tiles-body">
          <div class="tiles-title text-black">动态消息 <a ui-sref="app.timeline" class="pull-right">更多</a></div>
          <ul ng-if="feeds.length">
            <li ng-repeat="feed in feeds | limitTo:5" ng-switch on="feed.type">
              {{ ::feed._user.name }}
              <span ng-switch-when="share">共享了文件</span>
              <span ng-switch-when="project">添加了工程项目</span>
              <span ng-switch-when="report">提交新的工作报告</span>
              {{ ::feed.message }}
              <small><em><span class="text-muted" am-time-ago="feed.created_at"></span></em></small>
            </li>
          </ul>
          <p ng-if="!feeds.length">目前还没有动态消息</p>
        </div>
      </div>
    </div>
  </div>
</div>
